﻿<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>

<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@taglib uri="/struts-tags" prefix="s" %>
<%
	String path = request.getContextPath();
	String basePath = request.getScheme() + "://"
			+ request.getServerName() + ":" + request.getServerPort()
			+ path + "/";
%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
	<!-- 包含公共的JSP代码片段 -->
	
<title>无线点餐平台</title>



<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<script type="text/javascript" src="${pageContext.request.contextPath}/sys/style/js/jquery.js"></script>
<script type="text/javascript" src="${pageContext.request.contextPath}/sys/style/js/page_common.js"></script>
<link href="${pageContext.request.contextPath}/sys/style/css/common_style_blue.css" rel="stylesheet" type="text/css">
<link rel="stylesheet" type="text/css" href="${pageContext.request.contextPath}/sys/style/css/index_1.css" />
<script language="javascript" type="text/javascript">
$(".table").find(".dbclicktd").bind("dblclick", function () {
        var input = "<input type='text' id='temp' style='width:130px;' value=" + $(this).text() + " >";
        $(this).text("");
        $(this).append(input);
        $("input#temp").focus();
        $("input").blur(function () {
            if ($(this).val() == "") {
                $(this).remove();
            } else {
                $(this).closest("td").text($(this).val());
            }
        });
    });
</script>
</head>
<body>


<!-- 页面标题 -->
<div id="TitleArea">
	<div id="TitleArea_Head"></div>
	<div id="TitleArea_Title">
		<div id="TitleArea_Title_Content">
			<img border="0" width="13" height="13" src="style/images/title_arrow.gif"/> 菜品列表
		</div>
    </div>
	<div id="TitleArea_End"></div>
</div>


	<!-- 过滤条件 -->
	<div id="QueryArea">
		<form action="${pageContext.request.contextPath}/MenuPageAction!query" method="post">
			<td width="500">
						
						<label>
							<input name="Key" type="text" size="15"
								value="<s:property value="#session.Key"/>">
							<select name="Type" id="select">
								<option value="m_name"
									<s:if test="#session.Type=='m_name'">selected='selected'</s:if>>
									菜名
								</option>
								<option value="m_id"
									<s:if test="#sessionScope.Type=='m_id'">selected='selected'</s:if>>
									菜号
								</option>
							</select>
							<input type="submit" name="button" id="button" value="搜索">
						</label>
					</td>
		</form>
	</div>
<!-- 主内容区域（数据列表或表单显示） -->
<div id="MainArea">
    <table class="MainArea_Content" align="center" cellspacing="0" cellpadding="0">
        <!-- 表头-->
        <thead>
            <tr align="center" valign="middle" id="TableTitle">
            
				<td class="dbclicktd">菜编号</td>
				<td>菜名</td>
				<td>菜品类型</td>
				<td>菜品价格</td>
                <td>菜品上架时间</td>
                <td>菜品状态</td>
                <td>菜品描述</td>
                <td>菜品图片</td>
				<td>操作</td>
			</tr>
		</thead>	
		<!--显示数据列表 -->
        <tbody>
          <s:iterator value="list" var="Menu">
            <tr>
               <td class="dbclicktd" align="center" width="5%">
               <s:property value="#Menu.m_id"/>
               </td>
                <td align="center" width="10%">
                <s:property value="#Menu.m_name"/>
               
               </td>
               <td align="center" width="10%">
               <s:property value="#Menu.m_type"/>
               </td>
               <td align="center" width="8%">
               <s:property value="#Menu.m_price"/>
               </td>
               <td align="center" width="18%">
               <s:property value="#Menu.m_time"/>
               </td>
               <td align="center" width="5%">
               <s:property value="#Menu.m_status"/>
               </td>
               <td align="center" width="24%">
               <s:property value="#Menu.m_describe"/>
               </td>
               
               <td align="center" width="15%">
              	<s:if test="#Menu.m_url_defal!=''">
              			<img src="/OrderSystem/img/<s:property value="#Menu.m_url_defal"/>" height="80px" width="100px" id="imgg"/>
              	</s:if>
              	<s:else>
              			<img src="/OrderSystem/img/UnUpLoadImg.png" height="80px" width="100px" id="imgg"/>
              	</s:else>
               </td>
               
               <td align="left" width="25%">
								
				<a href="MenuPageAction!SearchById?m_id=<s:property value="#Menu.m_id"/>" onClick="return confirm('是否修改指定记录?');"" class="FunctionButton">更新</a>				
				<a href="MenuPageAction!delete?m_id=<s:property value="#Menu.m_id"/>" onClick="return confirm('是否删除指定记录?');" class="FunctionButton">删除</a>
										
							
				</td>
             </tr>
             
        
             <tr>
             	<td>&nbsp;&nbsp;</td>
           		<td>&nbsp;&nbsp;</td>
           		<td>&nbsp;&nbsp;</td>
           		<td>&nbsp;&nbsp;</td>
           		<td>&nbsp;&nbsp;</td>
           		<td>&nbsp;&nbsp;</td>
           		<td>&nbsp;&nbsp;</td>
           		<td>&nbsp;&nbsp;</td>
           		<td>&nbsp;&nbsp;</td>
             </tr>
          </s:iterator>
        </tbody>
        
          <%-- <c:choose>
                  <c:when test="${!empty pm.list}">
                         <c:forEach items="${pm.list}" var="Menu">
                          <tr>
							<td width="16%">
								${Menu.menuNo}
							</td>
							<td width="20%">
								${Menu.menuName}
							</td>
							<td width="16%">
								${Menu.menuStyle}
							</td>
							<td width="16%">
								${Menu.menuPrice}
							</td>
							<td width="16%">
								${Menu.menuFavorable}
							</td>
							<td width="16%">
								${Menu.menuHandle}
							</td>
							
							<td align="center" width="12%">
								
								<a href=""  class="FunctionButton">更新</a>				
					            <a href="" onClick="return confirm('是否删除指定记录?');" class="FunctionButton">删除</a>
										
							
							</td>
						</tr>
                          
                          </c:forEach>
                  
                  </c:when>
                  <c:otherwise>
					<tr align="center">
						<td colspan="8">
							<span class="STYLE1"> 无信息！ </span>
						</td>
				</c:otherwise>
        </c:choose> --%>
        
    </table>
	
	
	
	
   <!-- 其他功能超链接 -->
	<div id="TableTail" align="center">
		<div class="FunctionButton"><a href="${pageContext.request.contextPath}/sys/saveFood.jsp">添加</a></div>
    </div> 
</div>
</body>
</html>
